package com.lut.factory.simple;

/**
 * @author liuning
 * @ProjectName SingleModel
 * @time 2021/12/14 17:35
 */
public class Consumer {
    public static void main(String[] args) {
        //接口，实现所有的类
//        Car car = new WuLing();
//        Car car2 = new Tesla();
        //使用工厂创建
        Car car = CarFactory.getCar("五菱");
        Car car2 = CarFactory.getCar("特斯拉");

        car.name();
        car2.name();
    }
}
